#ifndef MOVEWIDGET_H
#define MOVEWIDGET_H

#include <QObject>
#include <QWidget>

class MoveWidget : public QObject
{
    Q_OBJECT

public:
    explicit MoveWidget(QObject *parent=0);

protected:
    bool eventFilter(QObject *watched, QEvent *event);

    QPoint lastPoint;
    bool pressed;
    bool leftBtn;
    bool inControl;
    QWidget *widget;

public slots:
    void setLeftButton(bool leftButton);
    void setControl(bool inControl);
    void setWidget(QWidget *widget);
};

#endif // MOVEWIDGET_H
